package com.hd.assistant.biz.manager.share;

import com.hd.assistant.biz.manager.exception.ManagerException;
import com.hd.assistant.dal.dao.query.share.ShareQuery;
import com.hd.assistant.dal.dataobject.share.Share;
import com.hd.assistant.dal.dataobject.share.ShareRecord;

public interface ShareManager {

	/**
	 * 插入数据库 放到缓存中
	 * @param share
	 * @throws ManagerException
	 */
	public void insertShareToDB(Share share) throws ManagerException;
	
	/**
	 * 先从缓存取  取不到再从DB取 然后放回缓存
	 * @param shareId
	 * @throws ManagerException
	 */
	public Share getShareFromCache(Long shareId)throws ManagerException;

	
	/**
	 * 先从缓存取  取不到再从DB取 然后放回缓存
	 * @param shareId
	 * @throws ManagerException
	 */
	public Share getShareFromCache(String shareId)throws ManagerException;
	public ShareQuery getSharesByQuery(ShareQuery query)throws ManagerException;
	
	public void insertShareRecordToDB(ShareRecord record)throws ManagerException;
}
